<template>
  <el-container>
    <el-header>
      <headPart></headPart>
    </el-header>
    <el-main>
      <template>
        <div class="w">
          <h2 class="title">
            <span class="el-icon-office-building"></span><i>房产分类</i>
          </h2>
          <mainPart ref="categoryList"></mainPart>
        </div>
      </template>
    </el-main>
    <el-footer>
      <footerPart></footerPart>
    </el-footer>
  </el-container>
</template>

<script>
import footerPart from "@/Layout/footer/index.vue";
import headPart from "@/Layout/head/index.vue";
import mainPart from "@/Layout/main/index.vue";
import { getCategorys } from "@/api/hotel.js";
export default {
  components: {
    footerPart,
    headPart,
    mainPart,
  },
  data() {
    return {
      id: "",
    };
  },
  created() {
    console.log(39, this.$route.query);
    this.getCategorys();
  },
  methods: {
    async getCategorys() {
      const { data } = await getCategorys();
      // console.log(38, data);
      this.$refs.categoryList.list = data;
    },
  },
};
</script>

<style lang="less" scoped>
* {
  margin: 0;
  padding: 0;
}
.w {
  width: 1200px;
  margin: 0 auto;
  .title {
    text-align: left;
    text-indent: 2em;
    margin: 15px 0;
    font-weight: 400;
    color: orange;
    font-size: 20px;
    i {
      font-weight: 400;
    }
  }
}
</style>
